Conventionally, in a welding robot having a resistance welding gun attached to an end of its robot arm, a moving-side electrode is moved by a driving source such as an air cylinder or a servomotor (gun axis servomotor) to hold an object to be welded together with a fixed-side electrode which forms a pair, the object is held with pressure, and a high-current is passed for performing welding. Since both of the paired electrodes are gradually worn due to pressure and welding heat at welding, it has been necessary to detect amounts of wear of the electrodes during operation of the robot to correct positions of the electrodes.
As a method for correcting positions of the electrodes, an equalizing mechanism (mechanism which is usually fixed, but the fixation is released at the application of pressure to move a welding gun supported by a spring to an optimal position) is provided, or a method described in JP-A-7-284957 is employed.
However, the equalizing mechanism has a disadvantage of being expensive. Additionally, the method in JP-A-7-284957 has a problem that distribution of a wear amount is previously determined, or a wear amount of a fixed-side electrode is obtained by subtracting a wear amount of a moving-side electrode from an entire wear amount (fixed-side electrode plus moving-side electrode), in which the former method is not of high accuracy and the latter method is complicated since it involves a two-step procedure.